<?php //debug($paralelos);       ?>
<div class="row-fluid">
    <div class="span8">
        <h3 class="heading">NIVELES</h3> 
        <table class="table table-striped table-bordered dTableR" id="dt_a">
            <thead>
                <tr>               
                    <th>COD</th>
                    <th>Nombre</th>                    
                    <th>Acciones</th>     
                </tr>
            </thead>
            <tbody>
                <?php foreach($niveles as $niv): ?>
                    <?php $idNiv = $niv['Nivele']['id']; ?>
                    <tr>  
                        <td><?php echo $idNiv; ?></td>
                        <td><?php echo $niv['Nivele']['nombre']; ?></td>                        
                        <td>   
                            <?php echo $this->Ajax->link(
                                'Paralelos',
                                array( 'controller' => 'Niveles', 'action' => 'ajaxparalelosnivel', $idNiv ),
                                array( 'update' => 'paralelos')
                                );
                            ?>
                            <?php //echo $this->Html->link('PARALELOS', array('action' => 'paralelosnivel', $idNiv), array('id'=>"paralelo_$idNiv")); ?>                            
                        </td>
                    </tr>
                    <?php
                endforeach;
                ?>
            </tbody>
        </table>                
    </div>       
    <div class="span4">
        <div id="paralelos">
        </div>          
    </div>   
</div>
<script>
jQuery(document).ready(function($) {
 console.log('cargo todo');
});    
</script>
<!-- sidebar -->
<?php echo $this->element('menumaterias'); ?>
<!-- fin sidebar -->
<?php echo $this->element('jstablas'); ?>
<?php echo $this->Html->link('NUEVO NIVEL', array('action' => 'insertar'), array('class' => 'buttonS bGreen ')); ?>